<%--
  Created by IntelliJ IDEA.
  User: 82387
  Date: 2018/10/11
  Time: 15:09
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/WEB-INF/jsp/meta.jsp"%>
<html>
<head>
    <title>汇总查询</title>
</head>
<body>
<div class="block_layout block_form">
    <div class="block_title">
        <h3>组合查询</h3>
        <em><a onclick="javascript:HgUi.hideShowSearch(this);" class="slide_up"></a></em>
    </div>
    <div class="block_content">
        <form id="sumWageForm" class="hgform">
            <table cellpadding="0" cellspacing="0" class="table_form">
                <!--普通表单填写表格使用table_form-->
                <colgroup>
                    <col style="width: 120px;" />
                    <col style="width: 120px;" />
                    <col style="width: 120px;" />
                    <col style="width: 120px;" />
                </colgroup>
                <!--表单表格宽度控制使用colgroup，每个col对应下方的一个td，或者th，上下是对齐的-->
                <thead></thead>
                <!--表头-->
                <tfoot>
                <!--表尾，主要放表单按钮-->
                <tr>
                    <th></th>
                    <td colspan="7">
                        <a href="javascript:void(0);" class="a_blue" tag="submit"><em>查询</em></a>
                        <a href="javascript:void(0);" class="a_green" tag="clear"><em>重置</em></a>
                    </td>
                </tr>
                </tfoot>
                <tbody>
                <!--表内容，th是蓝色字体，主要放字段名，td为字段内容-->
                <tr>
                    <th><span>日期:</span></th>
                    <td>
                        <input type="text" class="Wdate"
                               onfocus="WdatePicker({dateFmt:'yyyy-MM'})" name="sysDate"/>
                    </td>
                </tr>
                </tbody>
            </table>
        </form>
    </div>
</div>
<div class="easyui-layout"  data-options="fit:true">
    <div data-options="region:'north',border:false"
         style="padding: 0px;height: 410px">
        <table  class="easyui-datagrid" fit="true" fitColumns="true" id="sumWageList"
                url="${ctx}/wage/getSumList" toolbar="#sumWage_toolbar"
                rownumbers="true" style="height: 500px">
            <thead>
            <tr>
                <th field="sysDate" width="80">日期</th>
                <th field="deptName" width="80">部门</th>
                <th field="uesrBasicwage" width="80">基本工资</th>
                <th field="userSalaryscale" width="80">薪级工资</th>
                <th field="userMiles" width="80">里程补贴</th>
                <th field="userMisuse" width="80">误餐补助</th>
                <th field="userOvertimepay" width="80">加班费</th>
                <th field="userOrther1" width="80">其他1</th>
                <th field="userPayablewage" width="80">应发工资</th>
                <th field="userSocialsecurity" width="80">社保费</th>
                <th field="userAccumulation" width="80">公积金</th>
                <th field="userAbsenteeism" width="80">缺勤扣发</th>
                <th field="userIncometax" width="80">所得税</th>
                <th field="userOther2" width="80">其他2</th>
                <th field="userNetpayroll" width="80">实发工资</th>
            </tr>
            </thead>
        </table>
        <div id="sumWage_toolbar" tag=listen_hotkey>
            <table class="table_form_result">
                <caption>
                    <a href="javascript:void(0);" class="a_btn_green" tag="print"><em>汇总打印</em></a>
                </caption>
            </table>
        </div>
    </div>
</div>
<script type="text/javascript">
    $("#sumWageForm input[name='sysDate']").val(getPreMonth());
    function getPreMonth() {
        var now = new Date(); //当前日期
        var myYear = now.getFullYear();
        var month = now.getMonth();
        if(month <10){
            if(month==0){
                month = 12;
            }else {
                month ="0"+ month;
            }

        }
        return myYear + "-" + month;
    }

    $("#sumWageForm").find("[tag=submit]").click(function () {
        var parm = {};
        parm["sysDate"] = $("#sumWageForm input[name='sysDate']").val();
        $("#sumWageList").datagrid('load',parm);
    });
    $("#sumWageForm").find("[tag=clear]").click(function () {
        $("#sumWageForm input[name='sysDate']").val(getPreMonth());
        var parm = {};
        parm["sysDate"] = $("#sumWageForm input[name='sysDate']").val();
        $("#sumWageList").datagrid('load',parm);
    });
    $("#sumWage_toolbar").find("[tag=print]").click(function () {
        window.open("${ctx}/wage/printSumWage?sysDate="+$("#sumWageForm input[name='sysDate']").val(), "_blank");
    });
</script>
</body>
</html>
